<%-- 
    Document   : eventlist
    Created on : Oct 20, 2012, 8:01:48 PM
    Author     : Mishal Parmar
--%>

<%@page import="entityclasses.event"%>
<%@page import="controllers.viewEvent"%>

<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <%
        
        viewEvent eventview =new viewEvent();
        event event=new event();
        ArrayList array = new ArrayList();  
        Object result = request.getAttribute("eventlist");  
//        out.println("hello");
        //String abc=request.getAttribute("event").toString();
        array = (ArrayList<event>) result;  
        //out.println(abc);
        out.println("<h1> Event List </h1> <table border=1>");
        for(int i=0;i<array.size();i++)
         {
            out.println("<tr>");
        event= (event) array.get(i);
        out.println("<Td>" +event.getEventId());  
        out.println("<Td>" + event.getAccessId());
        out.println("<td>"+event.getTypeId());  
        out.println("<td>"+event.getPosteddt());
        out.println("<tr>");
         }
        out.println("<table>");
       
        %>
    </body>
</html>
